package com.sunyur.tailor.channel.web.outer.returnorder.dto;

import com.sunyur.tailor.channel.service.inner.returnorder.param.Items;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @Author pengbing
 * @Description //创建退货单请求实体
 * @Date 13:56 2021/6/8
 * @Param
 * @return
 **/
@Data
public class CreateReturnOrderDTO implements Serializable{

	private static final long serialVersionUID = 4269031499886190468L;

	/**
	 * 采购商退货单号
	 */
	@NotEmpty(message = "采购商退货单号不能为空")
	@Size(max = 45, message = "采购商退货单号长度不能超过45")
	private String purReturnOrderCode;

	/**
	 * 收货单号
	 */
	@NotEmpty(message = "收货单号不能为空")
	@Size(max = 45, message = "收货单号长度不能超过45")
	private String receiveOrderCode;

	/**
	 * 操作人编号
	 */
	@NotEmpty(message = "操作人编号不能为空")
	@Size(max = 45, message = "操作人编号长度不能超过45")
	private String operatorCode;

	/**
	 * 备注
	 */
	@Size(max = 200, message = "备注长度不能超过45")
	private String remark;

	/**
	 * 退货行号
	 */
	@Valid
	@NotNull(message = "退货行号集合不能为空")
	private List<Items> items;

}
